<?php include_once("../../../common/common_setting_unit.php");         // 引入通用的设置文件 ?>
<?php include_once(ROOT_PATH_ . "/controller/common/module/head.php"); // 引入通用的头部 ?>

<?
//设置需要搜索的表格的前缀后缀
$table_Suffix = "link";
$table = $table_prefix . $table_Suffix;
//设置需要搜索的表格的前缀后缀
?>


<?php
$new_detail_nid = $_REQUEST['detail_nid'];
//print_r2($_REQUEST);
?>





<?php

//这里是设计上传文件的部分：包含图片和附件。视频也应该用这种形式上传
//统一设置一下保存图片的路径
$_uf['path']        = ROOT_PATH_ . "/uploadfiles/".$theme_folder."/";

//创建删除文件存放文件夹
if(!file_exists($_uf['path'] ."/delete/")){
    mkdir($_uf['path'] ."/delete/",0777,true);
    chmod($_uf['path'] ."/delete/",0777);
}




//上传icon
if (is_uploaded_file($_FILES['icon']['tmp_name']))
{
    $_uf['upfile']       = $_FILES['icon'];
    $_info               = upload_file($_uf);
    $_REQUEST['ai_icon'] = $_info['name'];
    if(($_REQUEST['ai_icon'])&&($old_detail['icon']!="alpha.gif"))
    {
        rename($_uf['path'].$old_detail['icon'], $_uf['path'] ."delete/".$old_detail['icon']);
    }
}




//设置需要搜索的表格的前缀后缀
$table_Suffix = "link";
$table = $table_Prefix . $table_Suffix;
//设置需要搜索的表格的前缀后缀




$sql=update_date($table,$_REQUEST,"nid",$new_detail_nid);
sql_log($sql);
$query = mysql_query($sql) or die (mysql_error().'保存$table表失败查询失败');
mysql_close($con);




?>






<script type="text/javascript">

    alert("输入信息已保存，点击确认返回继续操作.");
    document.location.href = "detail-list.php?sys_part=link";
</script>

</body>